Fix `--message-format JSON` when rustc emits non-JSON warnings
The `--message-format JSON` flag parses all the stderr output of rustc to JSON,
but rustc can emit non-JSON lines to stderr (e.g., for warning about the
unstable `-Z` flag on the stable channel), causing cargo to fail reporting
compilation errors when using `--message-format JSON`.
This commit adds a check to look for lines beginning with `{` to only parse
these lines as JSON. Other lines from rustc are forwarded to the stderr of
cargo.
Fixes #3390.